#include "binswap.cpp"

int other_ok(CBinCode* X, CPermutation& a) {
	for (int i=0; i<X[2].k &&
			!( X[2].row[i].is_set(a.tr[0]) ^ X[2].row[i].is_set(a.tr[1]) ) ;
			i++ ) ;
	return (i==X[2].k) ? 1 : 0 ;

}

main (int argc, char *argv[]) {

		CBinCode *X ;
		CPermutation a(28) ;
		char* fname = (argv[1][0]) ? argv[1] : "par" ;
    int filt = filter (fname, X, 	NULL ) ;
		// cout << X[1] ;

		int bl=0 ;
		for ( int j=0; j<X[1].k; j++)	{
			for ( int i=0; i<28; i++ ) {
				if ( I & (X[1].row[j].num >> i) )	{
					a.tr[bl] = i ;
					bl = (bl) ? 0 : 1 ;
					if ( !bl && other_ok(X, a)) {
						a.col_swap(X[0]);
						cerr << a.tr[0] <<" "<<a.tr[1] << endl ;
						cout << X[0] ;
						cerr << "yes ...\n" ;
						exit(0) ;
					}
				}
			}
		}
		// cerr << X[0] ;
return 0;
}
